/*
 * Example_01.cpp
 */

#include <iostream>
using namespace std;

class Base {
private:
	int _value;
public:
	Base() : _value( 0 ) {}
	void printValue() const {
		cout << "Base value = " << _value << endl;
	}
};

class First : public Base {
private:
	int _value;
public:
	First() : _value( 1 ) {}
	void printValue() const {
		cout << "First value = " << _value << endl;
	}
};

class Second : public Base {
private:
	int _value;
public:
	Second() : _value( 2 ) {}
	void printValue() const {
		cout << "Second value = " << _value << endl;
	}
};

//int main() {
//	cout << "Example_01" << endl << "----------" << endl;
//	Base b;
//	First f;
//	Second s;
//	cout << "direct calls:" << endl;
//	b.printValue();
//	f.printValue();
//	s.printValue();
//	Base &rf = f;
//	Base &rs = s;
//	cout << "reference calls:" << endl;
//	rf.printValue();
//	rs.printValue();
//	Base *pf = &f;
//	Base *ps = &s;
//	cout << "pointer calls:" << endl;
//	pf->printValue();
//	ps->printValue();
//	return 0;
//}
